package org.linlinjava.litemall.db.models;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.math.BigDecimal;

@Getter
@Setter
@ToString
@EqualsAndHashCode(callSuper = false)
@TableName("t_cart")
public class Cart extends BaseModel{

    @TableField("user_id")
    private Long userId;

    @TableField("goods_id")
    private Long goodsId;

    @TableField("goods_sn")
    private String goodsSn;

    @TableField("goods_name")
    private String goodsName;

    @TableField("product_id")
    private Long productId;

    @TableField("price")
    private BigDecimal price;

    @TableField("number")
    private Integer number;

    @TableField(value = "specifications", typeHandler = JacksonTypeHandler.class)
    private String[] specifications;

    @TableField("checked")
    private Boolean checked;

    @TableField("pic_url")
    private String picUrl;

}